// import dd = require("dingtalk-jsapi");
Page({
  data: {
    name: "全部功能",
    list: [
      {
        icon: '/image/ico_jianhuo@2x.png',
        text: '开始拣货',
        desc: '',
        onTap: 'onTapAllot'
      },
      {
        icon: '/image/ico_jianhuobf@2x.png',
        text: '开始包装',
        desc: '',
        onTap: 'onTapReturnMaterial'
      },
      {
        icon: '/image/bf.png',
        text: '装箱信息',
        desc: '',
        onTap: 'onTapReceiving'
      },
      {
        icon: '/image/ico_jianhuobf@2x.png',
        text: '采购入库',
        desc: '',
        onTap: 'onTapReturnMaterial'
      },
      // {
      //   icon: '/image/ico_jianhuobf3@2x.png',
      //   text: '库存盘点',
      //   desc: '',
      //   onTap: 'onTapReceiving'
      // },
    ],
    nameTow: "最近使用",
    listTow: [
      {
        icon: '/image/ico_khgx@2x.png',
        text: '客户关系',
        desc: '',
        onTap: 'onTapReturnMaterial'
      },
      {
        icon: '/image/ico_khdt@2x.png',
        text: '动态列表',
        desc: '',
        onTap: 'onTapReturnMaterial'
      },
    ],
    listTow2: [
      {
          icon: '/image/ico_qingjia@2x.png',
          text: '请假',
          desc: '',
          onTap: 'onTapReceiving'
        },
        {
          icon: '/image/ico_chuchai@2x.png',
          text: '出差',
          desc: '',
          onTap: 'onTapReceiving'
        },
        {
          icon: '/image/ico_baoxiao@2x.png',
          text: '报销',
          desc: '',
          onTap: 'onTapReceiving'
        },
        {
          icon: '/image/ico_lingyong@2x.png',
          text: '物品领用',
          desc: '',
          onTap: 'onTapReceiving'
        },
    ],
    listTow3: [
      {
          icon: '/image/ico_shenpi@2x.png',
          text: '审批',
          desc: '',
          onTap: 'onTapReceiving'
        },
        // {
        //   icon: '/image/ico_renwuguanjia@2x.png',
        //   text: '任务管家',
        //   desc: '',
        //   onTap: 'onTapReceiving'
        // },
    ],


  
    isMenu: false

  },
  onLoad() { },
  onTap(e, t) {
    var index = e.target.dataset.index;
    if (index == 0) {
      dd.navigateTo({
        url: '/pages/purchaseStockIn/purchaseStockIn'
      })
    } else if (index == 1) {
      dd.navigateTo({
        url: '/pages/pickingLists/pickingLists'
      })
    } else if (index == 2) {
      dd.navigateTo({
        url: '/pages/boxNew/boxNew'
      })
    } 
    else if (index == 3) {
      dd.navigateTo({
        // url: '/pages/Inventory/Inventory'
        url: '/pages/buyStorage/buyStorage'

      })
    }
   
  },

  onTapTow(e, t) {
    var index = e.target.dataset.index;
    if (index == 0) {
      dd.navigateTo({
        url: '/pages/client/client'
      })
    } else if (index == 1) {
      dd.navigateTo({
        url: '/pages/dynamicLists/dynamicLists'
      })
    }
  },
  onTapThree(e, t) {
    var index = e.target.dataset.index;
    if (index == 0) {
      dd.navigateTo({
        url: '/pages/outboundReview/outboundReview'
      })
    } 
  },
  onTapFour(e, t) {
    var index = e.target.dataset.index;
    if (index == 0) {
      dd.navigateTo({
        url: '/pages/outboundReview/outboundReview'
      })
    } 
  },
});
